<script module lang="ts">
    import { defineMeta } from "@storybook/addon-svelte-csf";
    import CountDown from "./CountDown.svelte";
    import { BothSide } from "../BothSide";
    import { Checkbox } from "../Checkbox";
    import { Space } from "../Space";
    import { Avatar } from "../Avatar";
    import Icon from "../Common/Icons/Icon.svelte";

    const { Story } = defineMeta({
        title: "Components/Other/CountDown",
        component: CountDown,
        tags: ["autodocs"],
        argTypes: {},
        args: {},
    });

    const start = Date.now() + 60000;
</script>

<Story name="Default">
    {#snippet template(args)}
        <CountDown value={start} />
    {/snippet}
</Story>

<Story name="Format">
    {#snippet template(args)}
        <CountDown value={start} format="HH时mm分ss秒" prefix="剩余时间：" />
    {/snippet}
</Story>
